﻿namespace HxMSimulator
{
    using System;
    using System.Threading;

    public static class Simulator
    {
        private const string SerialPortToWriteTo = "COM1";

        static void Main(string[] args)
        {
            var serialPortWriter = SerialPortWriter.GetInstance(SerialPortToWriteTo);
            serialPortWriter.OpenPort();
            while (true)
            {
                serialPortWriter.WriteToSerialPort(PacketGenerator.GetValidPacket());
                Console.WriteLine("Sent packet to port {0}", SerialPortToWriteTo);
                Thread.Sleep(1000);
            }
        }
    }
}
